#include<iostream>
using namespace std;
int main(int n){
	char c[999];
	cin>>n>>n;
	for(int m=n;m>0;m-=cin.gcount())
		cin.read(c,m>999?999:m);

	for(;!cin.eof();cout.write(c,cin.gcount())){
		cin.readsome(c,999);
		c[cin.gcount()]=0;
	}
}
